﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Ingineria_prog
{
    class Client
    {
        List<Car> carList;
        String nume;
        int varsta;

       public Client()
        {
            carList = new List<Car>();
        }
       public void addNume(string Nume)
       {
           this.nume = Nume;
       }

       public string getNume
       {
           get { return nume; }
       }

       public void addVarsta(int Varsta)
       {
           this.varsta = Varsta;
       }

      public  void AddCar(Car c)
        {
            carList.Add(c);
        }
       public void DeleteCar(string c)
        {

            foreach (Car car in carList)
            {
                if (car.getTip == c)
                {
                    carList.Remove(car);
                    break;
                }
            }
        }
       public void afiseaza()
       {
           Console.WriteLine(); Console.WriteLine();
           Console.Write("Numele Utilizatorului: ");
                Console.WriteLine(nume);
           Console.Write("Varsta Utilizatorului: ");
                Console.WriteLine(varsta);
 


                Console.WriteLine(); Console.WriteLine();
           foreach (Car masina in carList)
           {
               Console.WriteLine();
              
               Console.Write("Specificatiile masinii:   ");
                    Console.WriteLine();
               Console.Write("Tipul masinii: ");
                    Console.WriteLine(masina.getTip);
               Console.Write("Motorizare:  ");
                    Console.WriteLine(masina.getMotorizare);
               Console.Write("Dimensiune:  ");
                    Console.WriteLine(masina.getDimensiuni);
               Console.Write("Transmisie:  ");
                    Console.WriteLine(masina.getTransmisie);
               Console.Write("Dotari:  ");
               Console.WriteLine(masina.getDotari);
              
           }

       }
    }
}
